package com.windy.api.product;

import com.windy.app.entity.Product;
import com.windy.app.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient("app-product")
@RequestMapping("product")
public interface ProductClient {

    @GetMapping("findProductById")
    Product findProductById(@RequestParam(name = "id") Long id);

    @GetMapping("findAllProduct")
    List<Product> findAllProduct();

    @GetMapping("kcc")
    Result<Product> kcc(@RequestParam(name = "id") Long id , @RequestParam(name = "number") Integer number);
}
